import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

/* Layout */
import Layout from '../view/layout/Layout'


export default new Router({
  routes: [
    { path: '/404', component: () => import('../view/404'), hidden: true },
    { path: '/login', component: () => import('../view/login/index'), hidden: true },
    {
      path: '/',
      component: Layout,
      redirect: '/dashboard',
      name: 'Dashboard',
      hidden: true,
      children: [{
        path: 'dashboard',
        component: () => import('../view/dashboard/index')
      }]
    },



    {
      path: '/user',
      component: Layout,
      redirect: '/user/index',
      name: 'user',
      children: [
        {
          path: 'index',
          name: 'user',
          component: () => import('../view/user/index'),
          meta: { title: 'user', icon: 'user' }
        }

      ]
    },


  ]
})
